/* 
* @Author: Turbidsoul Chen
* @Date:   2016-05-25 10:42:32
* @Last Modified by:   Turbidsoul
* @Last Modified time: 2017-01-25 21:58:24
*/

'use strict';
import React from 'react';
import {Route, IndexRoute, IndexRedirect} from 'react-router';

import App from './App';
import TodoList from './todo/TodoList';
import Home from './Home';
import SampleIndexView from './SampleIndexView';
import SampleViewSide from './SampleViewSide';
import SampleViewMain from './SampleViewMain';
import EChartViewMain from './echart/EChartViewMain';
import EChartViewSide from './echart/EChartViewSide';
import SampleDemoEcharts from './echart/SampleDemoEcharts';

export function getRoutes() {
  return (
    <Route path="/" component={App}>
      <IndexRoute component={Home}/>
      <Route path="sample" components={{main: SampleViewMain, side: SampleViewSide}}>
        <IndexRoute component={SampleIndexView}/>
        <Route path="todo" component={TodoList}/>
      </Route>
      <Route path="echart" components={{main: EChartViewMain, side: EChartViewSide}}>
        <IndexRedirect to="sample"/>
        <Route path="sample" component={SampleDemoEcharts}/>
      </Route>
    </Route>
  );
}
